var app = getApp();

Page({
    data: {
        luntext: [ "报名审核", "退票审核" ],
        activeIndex: 0
    },
    onLoad: function(t) {
        wx.hideShareMenu();
        var a = wx.getStorageSync("db_tab"), e = app.contains(a, "../mycenter/check");
        console.log(e), 0 != e && (a[e].color = "selsects", console.log(a)), this.setData({
            yes: e,
            db_tab: a
        });
    },
    refresh: function(t) {
        var n = this, a = wx.getStorageSync("userInfo").id;
        if (0 == n.data.activeIndex) var i = 1; else i = 4;
        app.util.request({
            url: "entry/wxapp/PjCheck",
            data: {
                state: i,
                user_id: a
            },
            success: function(t) {
                console.log(t);
                var a = t.data;
                for (var e in a) a[e].time = app.ormatDate(a[e].time);
                n.setData({
                    sign_up_examine: a,
                    state: i
                });
            }
        });
    },
    tabClick: function(t) {
        var a = this, e = t.currentTarget.id;
        e != a.data.activeIndex && (a.setData({
            activeIndex: e
        }), a.refresh());
    },
    check_info: function(t) {
        var a = t.currentTarget.dataset.id, e = this.data.state;
        console.log(e);
        var n = this.data.sign_up_examine[a];
        console.log(n), wx.navigateTo({
            url: "check_info?id=" + n.id + "&hd_title=" + n.hd_title + "&img=" + n.img + "&name=" + n.name + "&tk_name=" + n.tk_name + "&time=" + n.time + "&state=" + e
        });
    },
    wode: function() {
        var t = this.data.db_tab;
        wx.reLaunch({
            url: t[3].src
        });
    },
    fabu: function() {
        wx.reLaunch({
            url: "../fabu/fabu"
        });
    },
    index: function() {
        var t = this.data.db_tab;
        wx.reLaunch({
            url: t[0].src
        });
    },
    classifination: function(t) {
        var a = this.data.db_tab;
        wx.reLaunch({
            url: a[1].src
        });
    },
    mine_activity: function(t) {
        var a = this.data.db_tab;
        wx.reLaunch({
            url: a[2].src
        });
    },
    onReady: function() {},
    onShow: function() {
        this.refresh();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {}
});